import DS from 'ember-data';
import Ember from 'ember';
import BaseModel from './base-model';
var Health = BaseModel.extend({
dateService: Ember.inject.service("date-service"),
itemtype: DS.belongsTo('dicttype'),//体检项目
examDateTime:DS.attr("number"), //体检时间
result:DS.attr("string"),//体检结果
resultAddtion:DS.attr("string"),//体检结果补充1
resultAddtionSec:DS.attr("string"),//体检结果补充2
examUser:DS.belongsTo('customer'),//体检人
createUser:DS.belongsTo('user'),//创建人
createDateTime:DS.attr("number"), //创建时间

examDate:Ember.computed("examDateTime",function(){
  var examDateTime=this.get("examDateTime");
  return this.get("dateService").timestampToTime(examDateTime);
}),
examDateString:Ember.computed("examDateTime",function(){
  var examDateTime=this.get("examDateTime");
  return this.get("dateService").formatDate(examDateTime,"yyyy-MM-dd");
}),

});

export default Health;
